package Fuente;

import General.SaicFrame;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.SQLException;
import javax.swing.ComboBoxModel;

public class Tecnicos extends SaicFrame {
    public Tecnicos() {
        initComponents();

         Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension frameSize = this.getSize();
        if (frameSize.height > screenSize.height) {
            frameSize.height = screenSize.height;
        }
        if (frameSize.width > screenSize.width) {
            frameSize.width = screenSize.width;
        }
        this.setLocation((screenSize.width - frameSize.width)/2, 220);
        this.dataSource1.consulta();
    }
    public void limpiar(){
    this.dataTextField1.setText("");
    this.dataTextField2.setText("");
    this.dataTextField3.setText("");
    this.dataTextField4.setText("");
    this.dataCombobox1.setSelectedIndex(0);
}

public void activar(){
   this.datahabilitador1.habilitaredison(this.panel1, this.dataTextField1);
   this.dataCombobox1.setEnabled(true);
}
public void desactivar(){
    this.datahabilitador1.deshabilitaredison(panel1, this.dataTextField1);
    this.datahabilitador1.deshabilitaredison(panel1,this.dataCombobox1);

}

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        datahabilitador1 = new FuenteDeDatos.Datahabilitador();
        dataSource1 = new FuenteDeDatos.DataSource();
        panel1 = new Comun.PanelRound();
        jLabel1 = new javax.swing.JLabel();
        buttonSeven9 = new org.edisoncor.gui.button.ButtonSeven();
        buttonSeven5 = new org.edisoncor.gui.button.ButtonSeven();
        buttonSeven6 = new org.edisoncor.gui.button.ButtonSeven();
        buttonSeven7 = new org.edisoncor.gui.button.ButtonSeven();
        buttonSeven8 = new org.edisoncor.gui.button.ButtonSeven();
        buttonSeven4 = new org.edisoncor.gui.button.ButtonSeven();
        buttonSeven1 = new org.edisoncor.gui.button.ButtonSeven();
        buttonSeven3 = new org.edisoncor.gui.button.ButtonSeven();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jPasswordField3 = new javax.swing.JPasswordField();
        dataTextField1 = new FuenteDeDatos.DataTextField();
        dataTextField2 = new FuenteDeDatos.DataTextField();
        dataTextField3 = new FuenteDeDatos.DataTextField();
        dataTextField4 = new FuenteDeDatos.DataTextField();
        jPasswordField1 = new javax.swing.JPasswordField();
        dataCombobox1 = new FuenteDeDatos.DataCombobox();

        dataSource1.setCodigosql("select * from tbl_empleados");
        dataSource1.setDb("db_saic");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Tecnicos");
        setBackground(new java.awt.Color(51, 153, 255));
        setUndecorated(true);

        jLabel1.setBackground(new java.awt.Color(255, 255, 255));
        jLabel1.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 30)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Catálogo de Técnicos");

        buttonSeven9.setText("Buscar");
        buttonSeven9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSeven9ActionPerformed(evt);
            }
        });

        buttonSeven5.setText("<<");
        buttonSeven5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSeven5ActionPerformed(evt);
            }
        });

        buttonSeven6.setText("<");
        buttonSeven6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSeven6ActionPerformed(evt);
            }
        });

        buttonSeven7.setText(">");
        buttonSeven7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSeven7ActionPerformed(evt);
            }
        });

        buttonSeven8.setText(">>");
        buttonSeven8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSeven8ActionPerformed(evt);
            }
        });

        buttonSeven4.setText("Nuevo");
        buttonSeven4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSeven4ActionPerformed(evt);
            }
        });

        buttonSeven1.setText("Guardar");
        buttonSeven1.setEnabled(false);
        buttonSeven1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSeven1ActionPerformed(evt);
            }
        });

        buttonSeven3.setText("Cancelar");
        buttonSeven3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSeven3ActionPerformed(evt);
            }
        });

        jLabel3.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 16));
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel3.setText("Nombre:");

        jLabel4.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 16));
        jLabel4.setForeground(new java.awt.Color(255, 255, 255));
        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel4.setText("Apellido Paterno:");

        jLabel5.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 16));
        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel5.setText("Apellido  Materno:");

        jLabel6.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 16));
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel6.setText("Contraseña:");

        jLabel7.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 16));
        jLabel7.setForeground(new java.awt.Color(255, 255, 255));
        jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel7.setText("Repetir Contraseña:");

        jLabel8.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 16));
        jLabel8.setForeground(new java.awt.Color(255, 255, 255));
        jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel8.setText("ID:");

        jLabel9.setFont(new java.awt.Font("Arial Rounded MT Bold", 0, 16));
        jLabel9.setForeground(new java.awt.Color(255, 255, 255));
        jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel9.setText("Cargo:");

        dataTextField1.setCampo("empleado_id");
        dataTextField1.setData(dataSource1);
        dataTextField1.setEnabled(false);

        dataTextField2.setCampo("nombre");
        dataTextField2.setData(dataSource1);
        dataTextField2.setEnabled(false);

        dataTextField3.setCampo("apellido_p");
        dataTextField3.setData(dataSource1);
        dataTextField3.setEnabled(false);

        dataTextField4.setCampo("apellido_m");
        dataTextField4.setData(dataSource1);
        dataTextField4.setEnabled(false);
        dataTextField4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dataTextField4ActionPerformed(evt);
            }
        });

        dataCombobox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ADMON", "TECNI" }));
        dataCombobox1.setCampo("cargo_id");
        dataCombobox1.setData(dataSource1);
        dataCombobox1.setEnabled(false);

        org.jdesktop.layout.GroupLayout panel1Layout = new org.jdesktop.layout.GroupLayout(panel1);
        panel1.setLayout(panel1Layout);
        panel1Layout.setHorizontalGroup(
            panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 1035, Short.MAX_VALUE)
            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(panel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 995, Short.MAX_VALUE)
                        .add(panel1Layout.createSequentialGroup()
                            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                    .add(panel1Layout.createSequentialGroup()
                                        .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                                .add(jLabel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 147, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                                .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                                    .add(jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                                    .add(jLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 147, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                                            .add(jLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                        .add(15, 15, 15))
                                    .add(jLabel7))
                                .add(jLabel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 69, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(jLabel9))
                            .add(10, 10, 10)
                            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(dataCombobox1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                                .add(jPasswordField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                                .add(dataTextField4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                                .add(dataTextField3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                                .add(dataTextField2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                                .add(dataTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                                .add(jPasswordField3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE))
                            .add(170, 170, 170)
                            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(panel1Layout.createSequentialGroup()
                                    .add(buttonSeven5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(buttonSeven6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 44, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(18, 18, 18)
                                    .add(buttonSeven7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 43, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(buttonSeven8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 62, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                .add(panel1Layout.createSequentialGroup()
                                    .add(1, 1, 1)
                                    .add(buttonSeven9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(buttonSeven3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                .add(panel1Layout.createSequentialGroup()
                                    .add(buttonSeven4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(buttonSeven1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                            .add(134, 134, 134)))
                    .addContainerGap()))
        );
        panel1Layout.setVerticalGroup(
            panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 392, Short.MAX_VALUE)
            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(panel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jLabel1)
                    .add(26, 26, 26)
                    .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(panel1Layout.createSequentialGroup()
                            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                .add(jLabel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(dataTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                .add(jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(dataTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(18, 18, 18)
                            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                .add(jLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(dataTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(16, 16, 16)
                            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                .add(jLabel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(dataTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(18, 18, 18)
                            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                .add(jLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(jPasswordField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                        .add(panel1Layout.createSequentialGroup()
                            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                .add(buttonSeven5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(buttonSeven6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(buttonSeven7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(buttonSeven8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                    .add(buttonSeven4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(buttonSeven1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                .add(panel1Layout.createSequentialGroup()
                                    .add(56, 56, 56)
                                    .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                        .add(buttonSeven3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                        .add(buttonSeven9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))))
                    .add(18, 18, 18)
                    .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jLabel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jPasswordField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 15, Short.MAX_VALUE)
                    .add(panel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jLabel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(dataCombobox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()))
        );

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(panel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(panel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void buttonSeven4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSeven4ActionPerformed
        try {
              this.limpiar();
              this.activar();
              this.datahabilitador1.deshabilitaredison(panel1, this.buttonSeven1);
              this.buttonSeven1.setEnabled(true);
              this.buttonSeven3.setEnabled(true);
              this.dataTextField1.setEnabled(false);
            this.dataTextField1.setText(this.dataSource1.consultaSN("select count(empleado_id)+1 from vw_tecnicos;").getString(1));

        } catch (SQLException ex) {
              this.limpiar();
           this.dataTextField1.setText("1");
        }
}//GEN-LAST:event_buttonSeven4ActionPerformed

    private void buttonSeven5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSeven5ActionPerformed
    this.dataSource1.primero();
    }//GEN-LAST:event_buttonSeven5ActionPerformed

    private void buttonSeven1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSeven1ActionPerformed
  // this.datahabilitador1.deshabilitaredisonmultiple(panel1, this.buttonSeven1, this.jTextField1);
         String password=new String(this.jPasswordField1.getPassword());
    String password2=new String(this.jPasswordField3.getPassword());
        if(password.equals(password2)){
String res=this.dataSource1.ejecutarPA("call  sp_tecnico_in('"+this.dataTextField2.getText()+"','"+
        this.dataTextField3.getText()+"','"+this.dataTextField4.getText()+"','"+this.dataCombobox1.getSelectedItem()+"','"+password+"',@r);");
new Error(this,true,res,0,"¡ATENCION!").setVisible(true);
  this.datahabilitador1.habilitaredison(panel1, this.buttonSeven1);
              this.buttonSeven1.setEnabled(false);
              this.dataSource1.consulta();
              this.desactivar();
//call  sp_tecnico_in('Gustavo','Ruiz','Cisneros','ADMON','qwerty');

} else{

     new Error(this,true,"Verifique la Contraseña",0,"¡ATENCION!").setVisible(true);
}
    }//GEN-LAST:event_buttonSeven1ActionPerformed

    private void dataTextField4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dataTextField4ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_dataTextField4ActionPerformed

    private void buttonSeven6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSeven6ActionPerformed
        this.dataSource1.anterior();
    }//GEN-LAST:event_buttonSeven6ActionPerformed

    private void buttonSeven7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSeven7ActionPerformed
       this.dataSource1.siguiente();
    }//GEN-LAST:event_buttonSeven7ActionPerformed

    private void buttonSeven8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSeven8ActionPerformed
       this.dataSource1.ultimo();
    }//GEN-LAST:event_buttonSeven8ActionPerformed

    private void buttonSeven3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSeven3ActionPerformed
      this.datahabilitador1.habilitaredison(panel1, this.buttonSeven1);
              this.buttonSeven1.setEnabled(false);
              this.desactivar();
              this.dataSource1.consulta();
    }//GEN-LAST:event_buttonSeven3ActionPerformed

    private void buttonSeven9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSeven9ActionPerformed
        ComboBoxModel modelo=(new javax.swing.DefaultComboBoxModel(new String[] {"empleado_id" ,"nombre", "apellido_p", "apellido_m"}));
        new busqueda(this,true,"vw_tecnicos",modelo,this.dataSource1,"BUSQUEDA DE Empleados","rptEmpleados").activar();
    }//GEN-LAST:event_buttonSeven9ActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new Tecnicos().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private org.edisoncor.gui.button.ButtonSeven buttonSeven1;
    private org.edisoncor.gui.button.ButtonSeven buttonSeven3;
    private org.edisoncor.gui.button.ButtonSeven buttonSeven4;
    private org.edisoncor.gui.button.ButtonSeven buttonSeven5;
    private org.edisoncor.gui.button.ButtonSeven buttonSeven6;
    private org.edisoncor.gui.button.ButtonSeven buttonSeven7;
    private org.edisoncor.gui.button.ButtonSeven buttonSeven8;
    private org.edisoncor.gui.button.ButtonSeven buttonSeven9;
    private FuenteDeDatos.DataCombobox dataCombobox1;
    private FuenteDeDatos.DataSource dataSource1;
    private FuenteDeDatos.DataTextField dataTextField1;
    private FuenteDeDatos.DataTextField dataTextField2;
    private FuenteDeDatos.DataTextField dataTextField3;
    private FuenteDeDatos.DataTextField dataTextField4;
    private FuenteDeDatos.Datahabilitador datahabilitador1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPasswordField jPasswordField1;
    private javax.swing.JPasswordField jPasswordField3;
    private Comun.PanelRound panel1;
    // End of variables declaration//GEN-END:variables

}
